package day20171108;

/**
 * Created by Administrator on 2017-11-8.
 */
public class Test1 {

    public static void main(String[] args) {


        System.out.println("hello");


        try {
            //出错的代码
            System.out.println(6 / 0);

            int[] numbers = new int[3];
            System.out.println(numbers[3]);

        } catch (ArithmeticException e) {
            // 出错后怎么处理
            System.out.println("除数为0！！！");
        } catch (ArrayIndexOutOfBoundsException e){
            System.out.println("数组越界！！！");
        } finally{

            System.out.println("world!");

        }


    }
}
